package com.itany.shop.service;

import com.itany.shop.exception.ProductNotExistException;
import com.itany.shop.exception.UserNotLoginException;
import com.itany.shop.vo.Cart;

/**
 * @Author:石小俊
 * @Date:2022/11/16 13:38
 * @Version:1.0-SNAPSHOT
 * @Description:
 */
public interface CartService {

    /**
     * 加入购物车
     * @param id    商品编号
     * @param cart  我的购物车
     */
    public void addCart(Integer id, Cart cart) throws UserNotLoginException, ProductNotExistException;

    /**
     * 修改明细数量
     * @param id
     * @param num
     * @param cart
     */
    public void modifyNum(Integer id,Integer num,Cart cart) throws UserNotLoginException, ProductNotExistException;

    /**
     * 删除指定明细
     * @param id
     * @param cart
     */
    public void removeCart(Integer id,Cart cart) throws UserNotLoginException, ProductNotExistException;
}
